package com.ruoyi.business.core.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.business.base.JoBaseService;
import com.ruoyi.business.core.domain.DivisionsCode;
import com.ruoyi.business.core.domain.vo.DivisionsCodeAllVo;
import org.w3c.dom.stylesheets.LinkStyle;

import java.util.List;

public interface DivisionsCodeService extends JoBaseService<DivisionsCode>
{
    /**
     * 详情
     */
    DivisionsCode findByCode(String code);

    /**
     * 根据父code查询
     */
    IPage<DivisionsCode> findByPCode(IPage iPage, DivisionsCode code);

    /**
     * 查询省编码
     */
    IPage<DivisionsCode> findProvincesByCode(IPage iPage, DivisionsCode code);

    /**
     * 查询市编码
     */
    IPage<DivisionsCode> findCitiesByCode(IPage iPage, DivisionsCode code);

    /**
     * 查询区县编码
     */
    IPage<DivisionsCode> findAreasByCode(IPage iPage, DivisionsCode code);

    /**
     * 查询乡镇编码
     */
    IPage<DivisionsCode> findStreetsByCode(IPage iPage, DivisionsCode code);

    /**
     * 查询村编码
     */
    IPage<DivisionsCode> findVillagesByCode(IPage iPage, DivisionsCode code);

    /**
     * 查询编码合集
     */
    IPage<DivisionsCodeAllVo> findAllByCode(IPage iPage, DivisionsCode code);

    /**
     * 跟进code获取数据
     *
     * @param code
     * @return
     */
    List<DivisionsCodeAllVo> findAllByCode(DivisionsCode code);
}
